package org.big.rocktproducer.hard;

import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Component;

@Component
@RocketMQMessageListener(
    topic = "${rocketmq.consumer.topic}", 
    consumerGroup = "${rocketmq.consumer.group}",
    selectorExpression = "*"  // 消费所有标签的消息
)
public class SimpleConsumer implements RocketMQListener<String> {
    
    @Override
    public void onMessage(String message) {
        System.out.println("Received message: " + message);
        // 处理业务逻辑
    }
}


